function WriteCapabilitiesSelector() {
	
	this.writeCapabilitiesSelector=writeCapabilitiesSelector;
	this.writeCapabilitiesOption=writeCapabilitiesOption;
	
function writeCapabilitiesSelector(capabilities){
	var html='';
	var contentArray=[];
	for ( var i = 0; i < capabilities.capability.length; i++) {
		var capType=capabilities.capability[i].type;
		contentArray.push(capType);
		
	}
	contentArray.sort();//sort alphabetically
	for(var i=0; i<contentArray.length; i++){
		var newText=this.writeCapabilitiesOption(contentArray[i]);
		html+=newText;
	}
		return html;
}	
	
	
	function writeCapabilitiesOption(capType){
		return '<option value=\"'+capType+'\">'+capType+'</option>';
	}
	
}